package com.cdht.data.http;

import com.cdht.dto.ResquestEncryptResult;
import com.cdht.util.DataUtil;
import com.cdht.util.JacksonUtil;

public class DataUtilTest3 {
    
    //1000
    public static void main(String[] args) {
        String appPrivateKey = "MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAKoCdXbauAMP+6ntaPASi6BduzTyr1xK+XH5BdjghN6JP05p7lzyZu1DPQaMITLxs63XAQQ8I6klfHoJnA87/ZpnfvLeQJ1FN11PR4xEzhg2qQgqMzG8OReS3Ob5WPr4DoFt1XWBqK7s86bBBmb8apaZLar4Q155k650uB2Y6SebAgMBAAECgYEAnDIuIcjJj2a73V+WLhub1PbI7NibbLwleiVEzgFZkeufEjgZG6RKFGrWQpG0Xs3aOzlyYaWvTdR3DNiPXR/M2vMdc73A2wlHw1Uie/B55+0oFYZFq+Tpbg3uePErqNCuB0bGFPCQPZ5akysQRvwL2t/RaDiSIxYDERvO3KeJ8AECQQDgrM31q9xTBuznIaUR6moPL1/sjxmMChKV5i1+WK3Aj7MoFWfnShfLg+UfDQ8taAH/Op2qLMkX3BthhwgoIU2bAkEAwbaDat2srqCPk3kcmpZvSO1XbrmzXLw6v6cfHQDWX5WyYNX+KrMEy4S8a/alsodsZjJ8gKw50VJ1B3US9uIuAQJBALLbXiqQ4hiGjtmBAzO79SqZgDeFw8Sj0B/c2aKXXdrJisoCIHETntW47hFGCCsRfWV9eD4c4QlJg9Kj+G5Z9LkCQEl7z/yRHPmdpPl/nw8xdAPJLTqurVDHgs3DOvVIpQnbgrBjXSibgn0l3EhkZ1UDNGbMThiNvN0gF479pXUMNgECQDHZoPO67FgDP0p7XqDA0yLlRiSSgHlmWKZ9en7MKLkFtYMqy7yphmoRXLl8ays0NmMYtMHQsHS/ct692cLanBo=";
        String appPublicKey = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCJzvc7ngh0sJDndGoLPqhIPdzsS1GLAgEW6IzK5WFGu7kLb+VGbBMuvQwluwOdXs539gM/riIbHnHYnmEQ7jzu+A5Ben31VSj6OnhLKVdOACj5hkqkoqSAQCxAUK6D8ht16zznudzagXWbXzriGK+i2KZKsWcg8Dn4U5h7ORAkIwIDAQAB";
        
        String wePrivateKey = "MIICdQIBADANBgkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBAJe5xx4mWETmcapTrwWd0I4hwag3HIYrVsBW1N2/dmExwTOZzxjGWdxJS/wxQlk4LlznxLNazFoTE2sFJc0geSAIP92QCubI0hNSDN02qZc5DtPwaSOFg5RGYbg4nnx4AQh/h+B8sKen6zQn/n0Sdt4MfKg8FF7rXCki4ugf3gXrAgMBAAECgYBwqtn7v4mokF8zljTPvOMTyGlgGpyp3SDsbw5fJEAp6KKJSNwKj7BG7n7oZUPZsOhswQbGENTSxnuS6x2o90Y5qFq6o7NHvttTO7khhnazQzwZqwc+aqStXhjrjmd/rNlaxrVrpX8w1ysd7Jkt7RG/9d6i9xihADt+FQwPFH+RQQJBAMooS+KwHpRyMKM5/YmWwMJ/QUMbuvARg5Gic+aGQcqQWqsiUJA1KJZn4GzSo4l02uyObttgUA5Mfh/m871tBNECQQDAIuUFE5oaKXC/sm6PSc9PNM5i7/TFyEr0fZElddeHVtz7q2AqXwk+y1Xg/MRS/F4hdqQ84e2CJjkEYfkdrL37AkBNRFOk5D377R1L9glDAnzQmkT+emXcBkWsb1QvQxd4be5JxMbYJ4lI25E65tOc4S4gBly2urw+itwWI3b76uRRAkAROs/YzbIzCGZQ+npJpS/PBYhAfQ4xMk3ucNg0SMYEH/j/JJYiFpWoqOlRnLkqS/FRBOejggsfcbgJOZPyYkxDAkAgwyOlHnulyPT3C5zK8t5bNP3DythuEdvWWNlNY7vd1/xQvsOHRnxHCmQ2hJAKX7uBNaoRs2Ur8CLc9b3brJrH";
        String wePublicKey = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCgTzFiZ2wQNBwibQ0sdZHovRLyXGKOXie5eNaP233W1G8KWqGwMuBCt2mdmhipkZb5yda843A6Id8Q7d55nkZcyR0e7Vv2X849kXwNe/UNP1dhlb99zuE604lqwFcNg+XH/Zd4e+zyM7shwjkkv5mKadNm7SojUqGYZ7cZoczP/wIDAQAB";
        
        
        String d = "{\"code\":\"0\",\"encryptData\":\"POcqFR3yqQj0d/kX9Ssq+XDcUBw2mLKFs+YdogI1WXUg9yHRmFMl9OO+NyMQza8w\",\"encryptKey\":\"USmET0iy/yCYVX0e8JRMWVR4vjXMpx69uuGWUEc/MJSyP52IDqCeVn1Wv6PXcbYiv7ZPxmtEhFN30ELy1A8Vj1W0U2sCLQV0llojwDZM49K70CbUBjdjuiCDk7oVJpZbf3jfHZgwJAJ3+fSH+gzURZfIE/ogw/cNp6vqIlgvXa8=\",\"msg\":\"加密成功\",\"sign\":\"ezkR4qTGWjtVJPYJ7GGYgYuKzXKtlInHKkD8Ix96zngUMiIkZc4LxxEjVEPfPGZqJPLuzwk5v2AklqZwrznQx25IzmJsw3ANr7umylSnb30A5OlpmdzDelH2/KtV8cs0KobXLdCFGPhjFNSme+hHF+qerSPJ1FDsqjGA9xKj5IE=\"}";
        ResquestEncryptResult resquestEncryptResult = JacksonUtil.jsonToObject(d, ResquestEncryptResult.class);
        System.out.println(DataUtil.decrypt(resquestEncryptResult, wePrivateKey, wePublicKey));
    }

}
